home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / util3 / util2.arc / NO.DOC < prev    next >
Encoding:
Text File  |  1988-10-27  |  4.5 KB  |  102 lines

  1.           NO                                     Charles Petzold
  2.           Command                                         No. 18
  3.  
  4.           ______________________________________________________
  5.  
  6.           Purpose:  Excludes specified files in a subdirectory
  7.                     from the action of a command.
  8.  
  9.           Format:   NO filespec Command [parameter]
  10.  
  11.           Remarks:  NO.COM is designed for situations in which
  12.                     you want to apply a command such as DELete or
  13.                     COPY to all the files in a directory except
  14.                     one or two (or a class of) files.  For
  15.                     example,
  16.  
  17.                          NO *.BAS COPY *.* A:
  18.  
  19.                     copies all the files in your current
  20.                     subdirectory to drive A: except for those
  21.                     that have a .BAS extension.
  22.  
  23.                     To exclude more than one file (or category)
  24.                     you must use a separate NO command for each
  25.                     on the command line.  Thus,
  26.  
  27.                          NO *.ASM NO *.COM DEL *.*
  28.  
  29.                     deletes all files in the current directory
  30.                     except those with .ASM or .COM extensions.
  31.  
  32.                     Notes:
  33.  
  34.                     1.   NO.COM should not be used in conjunction
  35.                          with the PC-DOS BACKUP and RESTORE
  36.                          commands.  This is because NO operates
  37.                          by temporarily setting the "hidden" file
  38.                          attribute bit on the files to be
  39.                          excluded from the main command, then
  40.                          unhiding the files after the main
  41.                          command has been executed.  Since the
  42.                          DOS BACKUP/RESTORE operation acts on
  43.                          hidden and unhidden files alike, NO.COM
  44.                          cannot be used to exclude files from
  45.                          BACKUP/RESTORE.  RESTORE, indeed, will
  46.                          restore the supposedly excluded files as
  47.                          hidden, overwriting the originals.
  48.  
  49.                     2.   While NO.COM provides full path support
  50.                          (and so requires the use of DOS 2.0 or
  51.                          later), it is a good policy when using
  52.                          NO to use CHDIR to make the directory
  53.                          that contains the files on which you
  54.                          wish to operate the current directory.
  55.  
  56.                          For example, suppose you are in your
  57.                          root directory, one of whose subdirec-
  58.                          tories is \BASIC.  If you were to enter
  59.                          the command
  60.  
  61.                               NO *.BAS DEL \BASIC\*.*
  62.  
  63.                                  Page -24-
  64.  
  65.                          you would not delete all the files in
  66.                          the \BASIC subdirectory except those
  67.                          with a .BAS extension, as you might have
  68.                          intended to do.  To do this from the
  69.                          root directory you would have had to
  70.                          enter
  71.  
  72.                               NO \BASIC\*.BAS DEL \BASIC\*.*
  73.  
  74.                          This complete filespec would tell NO
  75.                          that it had to protect files in the
  76.                          \BASIC, not in the current (i.e., root)
  77.                          directory.
  78.  
  79.                          If you follow our recommendation and
  80.                          enter
  81.  
  82.                               CD \BASIC
  83.                               NO *.BAS DEL *.*
  84.  
  85.                          thus making \BASIC your current
  86.                          directory before you start deleting, you
  87.                          will then clean out all but the .BAS
  88.                          files, just as you intended.
  89.  
  90.                     3.   Should a parity check error, power
  91.                          outage, or system crash occur during the
  92.                          brief period between the times NO hides
  93.                          and subsequently unhides the protected
  94.                          files, those files will subsequently
  95.                          seem to have disappeared.  They are not
  96.                          lost; only hidden from a DIR listing.
  97.                          Use ATTR.COM (included in this set of
  98.                          utilities) to change their hidden
  99.                          status.
  100.  
  101.  
  102.  
  103.